﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using TurtleLib.ComputerCraft;
using System.Drawing;

namespace TurtleLib.Simulation
{
  public class MonitorUx : Screen, ISubscriber<ComputerCraft.Monitor>
  {
    public MonitorUx(DragablePanel dp)
      : base(dp)
    {
      _parent.BackColor = Color.Beige;
    }

    public void SubscribeTo(ComputerCraft.Monitor host)
    {
      SetTitle(host.GetType().Name);
      
      var size = host.getSize();
      SetOutputSize(size.Item1, size.Item2);

      base.SubscribeTo(host);
    }
  }
}
